import ok

from time import sleep

xem = ok.FrontPanel()

def connect():
    print('Found {} devices and had {} errors opening the first device\n It is {} that Front-Panel is enabled'.format(xem.GetDeviceCount(),xem.OpenBySerial(xem.GetDeviceListSerial(0)),xem.IsFrontPanelEnabled()))

def count():
    print('Count {} '.format(xem.ReadFromBlockPipeOut(0x20, 1, buf )))

connect()
count()
